<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> 
<meta name="viewport" content="width=device-width, initial-scale=1"> 
<title>login</title>
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<!--必要样式-->
<link rel="stylesheet" type="text/css" href="css/component.css" />
<!--[if IE]>
<script src="js/html5.js"></script>
<![endif]-->
</head>
<body>
		<div class="container demo-1">
			<div class="content">
				<div id="large-header" class="large-header">
					<canvas id="demo-canvas"></canvas>
					<div class="logo_box">
						<h3>欢迎你</h3>
						<form action="index.php" name="f" method="post">
							<div class="input_outer">
								<span class="u_user"></span>
								<input name="user_id" class="text" style="color: #666 !important" type="text" placeholder="请输入账户" id="username">
							</div>
							<div class="input_outer">
								<span class="us_uer"></span>
								<input name="user_password" class="text" style="color: #666 !important; position:absolute; z-index:100;"value="" type="password" placeholder="请输入密码" id="password">
							</div>
							<div class="mb2"><a href="#" class="act-but submit"  style="color: #FFFFFF" onclick="login()">登陆</a></div>
							<div class="mb2"><a class="act-but submit" href="注册.html" style="color: #FFFFFF">注册</a></div>
							 
						</form>
					</div>
				</div>
			</div>
		</div><!-- /container -->
		<script src="js/TweenLite.min.js"></script>
		<script src="js/EasePack.min.js"></script>
		<script src="js/rAF.js"></script>
		<script src="js/demo-1.js"></script>
		<script src="js/app/my.js"></script>
		<script src="js/app/config.js"></script>
		<script>
			function login(){
				var username = document.getElementById("username").value;
				var password = document.getElementById("password").value;
				request(serverUrl+"/user/login","POST",'{"userName":"'+username+'","passWord":"'+password+'"}',function(res){
					console.log(res);
					var obj = JSON.parse(res);
					if(obj.code==200){
						addCookie("token",obj.data);
						console.log(obj.data);
					}
				});
			}
		</script>
	</body>
</html>